package com.foreknow.elm.controller;

import com.foreknow.elm.po.Food;
import com.foreknow.elm.service.FoodService;
import com.foreknow.elm.service.impl.FoodServiceImpl;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author shkstart
 * @create 2021-08-26 16:24
 */
public class FoodController {

    public List<Food> listFoodByBusinessId(HttpServletRequest request) throws  Exception{
        //获取请求参数
        int  businessId = Integer.parseInt(request.getParameter("businessId"));
        //调用servlet方法
        FoodService service=new FoodServiceImpl();
        List<Food> foods = service.listFoodByBusinessId(businessId);


        return foods;
    }
}
